import { characterServer, MoveServer, SkillServer, SkinServer } from "./serverLib";




/* 加载角色事件 */
characterServer.onCharacterAdd(characterEntity => {
    if (characterEntity.character) {
        SkinServer.generateAccsForCharacter(characterEntity);
        MoveServer.addForces(characterEntity)// 添加玩家角色力学
        SkillServer.addCharacter(characterEntity.character)
        characterEntity.skills = SkillServer.getSkills(characterEntity)//加载技能
    }

    if (characterEntity.player)
        characterServer.syncPlayerCharacter(characterEntity, { player: characterEntity.player })//同步角色
})
